2 Copyright (C) 2024 Rubén Beltrán del Río
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see https://map.tranquil.systems.
19 struct EvolutionPicker: View {
21 @Binding var selectedEvolution: StageType
24 Picker("Evolution", selection: $selectedEvolution) {
25 ForEach(StageType.types) { stage in
26 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
29 ForEach(StageType.characteristics) { stage in
30 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0).font(.theme.body)
33 ForEach(StageType.properties) { stage in
34 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
37 ForEach(StageType.custom) { stage in
38 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
40 }.font(.theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
45 let selectedEvolution: StageType = .behavior
46 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))